//
//  TCPReceiveDataManager.swift
//  TimeBoat
//
//  Created by Jun on 2022/9/8.
//  Copyright © 2022 Time Boat. All rights reserved.
//

import Foundation

@objcMembers class TCPReceiveDataManager: NSObject {
    @objc static let shared = TCPReceiveDataManager()
    
    private let TAG = LogTag.init(rawValue: "TCPReceiveDataManager")
    
    @objc public func start() {
        Log.debug(tag: TAG, "start")
        
        TCPBaseManager.shared.delegate = self
    }
}

extension TCPReceiveDataManager: TCPBaseManagerDelegate {
    func didReceiveData(data: Data) {
        let cmd = String.init(data: data, encoding: .utf8)
        if nil != cmd {
            Log.debug("receive cmd = " + cmd!)
        }
    }
}

